package net.csdn.business.webhook.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.csdn.business.common.domain.query.WebhookLogQuery;
import net.csdn.business.common.domain.request.webhook.NewWebhookLogDTO;
import net.csdn.business.common.domain.vo.WebhookLogVO;

import java.util.List;
import java.util.Map;

/**
 * webhook通知日志Service接口
 * 
 * @author zhangyal
 * @date 2023-04-23
 */
public interface IWebhookLogService
{

    /**
     * 分页查询webhook通知日志
     *
     * @param query webhook通知日志详细信息
     * @return webhook通知日志
     */
    public Page<WebhookLogVO> findPageList(WebhookLogQuery query);

    /**
     * 根据id查询webhook通知日志详细信息
     * 
     * @param id webhook通知日志主键
     * @return webhook通知日志
     */
    public WebhookLogVO selectWebhookLogById(String id);

    /**
     * 查询webhook通知日志列表
     * 
     * @param query webhook通知日志
     * @return webhook通知日志集合
     */
    public List<WebhookLogVO> selectWebhookLogList(WebhookLogQuery query);

    /**
     * 新增webhook通知日志
     * 
     * @param webhookLog webhook通知日志
     * @return 结果
     */
    public Integer insertWebhookLog(NewWebhookLogDTO webhookLog);


    public Integer deleteWebhookLogById(String id);

    /**
     * @Author zhangyl
     * @Description 查询最近一次的通知记录httpStatus
     * @Date 14:56 2023/5/8
     * @Param
     * @return
     **/
    public Map<String,Object> getLastDelivery(String webhookId);

}
